//
//  ChatRoster.m
//  LTChat
//
//  Created by apple on 4/21/14.
//  Copyright (c) 2014 fantasy. All rights reserved.
//

#import "ChatRoster.h"

@implementation ChatRoster
-(id)initWithItem:(NSXMLElement *)item
{
    self = [super init];
    if (self) {
        NSXMLNode *jidNode = [item attributeForName:@"jid"];
        self.jid = [XMPPJID jidWithString:[jidNode stringValue]];
        self.user = [[self jid] user];
        self.nickName = [[item attributeForName:@"name"] stringValue];
        self.ask = [[item attributeForName:@"ask"] stringValue];
        self.subscription = [[item attributeForName:@"subscription"] stringValue];
    }
    return self;
}
@end
